package com.qf.cx.simplenms.link.rai.model;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import com.sun.jna.Structure;

public class TagResult extends Structure {
	
	public byte opNum;
	public byte antennaId;
	public byte[] temp = new byte[2];
	public long  seenTimestampUTC;
	public byte[] tidData = new byte[RaiLimit.MAX_TID_LEN];
	public OpResult[] opResult = new OpResult[RaiLimit.MAX_OP_NUM];
	
	{
		for(int i = 0; i < RaiLimit.MAX_OP_NUM; i++)
		{
		    opResult[i] = new OpResult();
		}
	}
	
	public static class ByValue  extends TagResult implements Structure.ByValue{ }		
	public static class ByReference extends TagResult implements Structure.ByReference{ }
	
    @Override  
    protected List<String> getFieldOrder() {  
        List<String> a = new ArrayList<String>();  
        a.add("opNum");   
        a.add("antennaId");  
        a.add("temp");   
        a.add("tidData");  
        a.add("opResult");   
 
        return a;  
    }

	@Override
	public String toString() {
		return "TagResult [opNum=" + opNum + ", antennaId=" + antennaId + ", temp=" + Arrays.toString(temp)
				+ ", seenTimestampUTC=" + seenTimestampUTC + ", tidData=" + Arrays.toString(tidData) + ", opResult="
				+ Arrays.toString(opResult) + "]";
	}

    
}
